package com.happy.entity;

// default package

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * @{#} PubMessage.java Create on Apr 22, 2009 9:07:18 AM
 *      <p>
 * 
 * </p>
 * @author <a href="mailto:maopenglin@hotmail.com">毛鹏霖</a>
 * @version v 0.1
 */
@Entity
@Table(name = "SEC_MESSAGE", schema = "sec")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Message implements java.io.Serializable {

	// Fields

	private Long nuId;
	private String vcTitle;
	private String vcContent;
	private String nuSendUserId;
	private String nuReceiveUserId;
	private String chStatus;
	private String nuMsgType;
	private Date date;

	// Constructors

	/** default constructor */
	public Message() {
	}

	/** minimal constructor */
	public Message(Long nuId) {
		this.nuId = nuId;
	}

	/** full constructor */
	public Message(Long nuId, String vcTitle, String vcContent,
			String nuSendUserId, String nuReceiveUserId, String nuStatus,
			String nuMsgType) {
		this.nuId = nuId;
		this.vcTitle = vcTitle;
		this.vcContent = vcContent;
		this.nuSendUserId = nuSendUserId;
		this.nuReceiveUserId = nuReceiveUserId;
		this.chStatus = nuStatus;
		this.nuMsgType = nuMsgType;
	}

	// Property accessors
	// @SequenceGenerator(name = "SEQ_CLS_PUB_MESSAGE", sequenceName =
	// "SEQ_CLS_PUB_MESSAGE")
	// @Id
	// @GeneratedValue(strategy = GenerationType.SEQUENCE, generator =
	// "SEQ_CLS_PUB_MESSAGE")
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "nuId", unique = true, nullable = false)
	public Long getNuId() {
		return this.nuId;
	}

	public void setNuId(Long nuId) {
		this.nuId = nuId;
	}

	@Column(name = "VC_TITLE", unique = false, nullable = true, insertable = true, updatable = true, length = 30)
	public String getVcTitle() {
		return this.vcTitle;
	}

	public void setVcTitle(String vcTitle) {
		this.vcTitle = vcTitle;
	}

	@Column(name = "VC_CONTENT", unique = false, nullable = true, insertable = true, updatable = true, length = 500)
	public String getVcContent() {
		return this.vcContent;
	}

	public void setVcContent(String vcContent) {
		this.vcContent = vcContent;
	}

	@Column(name = "NU_SEND_USER_ID", unique = false, nullable = true, insertable = true, updatable = true,length = 25)
	public String getNuSendUserId() {
		return this.nuSendUserId;
	}

	public void setNuSendUserId(String nuSendUserId) {
		this.nuSendUserId = nuSendUserId;
	}

	@Column(name = "NU_RECEIVE_USER_ID", unique = false, nullable = true, insertable = true, updatable = true,length = 25)
	public String getNuReceiveUserId() {
		return this.nuReceiveUserId;
	}

	public void setNuReceiveUserId(String nuReceiveUserId) {
		this.nuReceiveUserId = nuReceiveUserId;
	}

	@Column(name = "CH_STATUS", unique = false, nullable = true, insertable = true, updatable = true, length=2)
	public String getChStatus() {
		return this.chStatus;
	}

	public void setChStatus(String nuStatus) {
		this.chStatus = nuStatus;
	}

	@Column(name = "CH_MSG_TYPE", unique = false, nullable = true, insertable = true, updatable = true)
	public String getNuMsgType() {
		return this.nuMsgType;
	}

	public void setNuMsgType(String nuMsgType) {
		this.nuMsgType = nuMsgType;
	}
	@Column(name = "DA_SEND_TIME", unique = false, nullable = true, insertable = true, updatable = true, precision = 2, scale = 0)
	public Date getDate() {
		return date;
	}
   
	public void setDate(Date date) {
		this.date = date;
	}


}